#pragma once
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include<assert.h>
#define NUM 1024
#define BUF_NONE 0x1
#define BUF_LINE 0x2
#define BUF_ALL  0x4

typedef struct MY_FILE
{
    int fd;
    char outputbuffer[NUM];
    int flags;//刷新方式
    int current;
} my_file;


my_file* myfopen(const char *path, const char *mode);
size_t myfwrite(const void *ptr, size_t size, size_t nmemb,my_file *stream);
int myfflush(my_file *stream);
int myfclose(my_file *fp);
